100 |
How can I show the item in italics
|
99 |
How can I show the item in bold
|
98 |
How can I show the item as disabled but still be able to select or use it
|
97 |
How can I enable or disable an item
|
96 |
How can I add a separator item
|
95 |
How can I change the item's foreground color
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems:Add("<fgcolor FF0000>Item") oItems:Add(""):ToString := "Item[fg=RGB(255,0,0)]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
94 |
How can I change the item's background/backcolor, when the item is selected/checked (radio-buttons)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Radio 1") oitem1:SetProperty("HotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oitem1:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oitem1:SetProperty("SelHotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem1:Radio := .T. oitem1:RadioGroup := 100 oitem1:Checked := .T. oitem2 := oItems1:Add("Radio 2") oitem2:SetProperty("HotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oitem2:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oitem2:SetProperty("SelHotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem2:Radio := .T. oitem2:RadioGroup := 100 oItems1:Add(""):ToString := "Radio 3[typ=2][show=1][grp=100][bghot=RGB(255,255,255)][bgsel=RGB(255,0,0)][bgselhot=RGB(255,0,0)]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
93 |
How can I change the item's background/backcolor, when the item is selected/checked (check-box)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("Check 1") oitem:SetProperty("HotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oitem:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oitem:SetProperty("SelHotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oitem:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem:Checked := .T. oitem:Check := .T. oItems:Add(""):ToString := "Check 2[typ=1][chk=0][show=1][bghot=RGB(255,255,255)][bgsel=RGB(255,0,0)][bgselhot=RGB(255,0,0)]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
92 |
How can I prevent showing the border for selected/highlight/hot items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oItems := oExContextMenu:Items() oItems:Add("Item") oItems:Add("Item") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
91 |
How can I change the item's background/backcolor, when the cursor hovers it (hot)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item"):SetProperty("HotBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems:Add(""):ToString := "Item[bghot=RGB(255,0,0)]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
90 |
How can I change the item's background/backcolor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oItems := oExContextMenu:Items() oItems:Add("Item"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems:Add("Item"):SetProperty("BackColor",0x1000000) oItems:Add(""):ToString := "Item[bg=RGB(255,0,0)]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
89 |
How can I specify/assign the item's identifier
|
88 |
How can I show a horizontal separator/line between groups (method 3,EBN color)
|
87 |
How can I show a horizontal separator/line between groups (method 2,solid color)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2,oitem3 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("") oitem1:AllowEdit := 3/*exItemEditSlider*/ oitem1:EditBorder := 0/*exEditBorderNone*/ oitem1:EditWidth := -128 oitem1:EditValue := 25 oitem2 := oItems1:Add("") oitem2:Enabled := .F. oitem2:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oitem2:ItemHeight := 8 oitem2:CaptionWidth := 128 oitem3 := oItems1:Add("") oitem3:AllowEdit := 3/*exItemEditSlider*/ oitem3:EditBorder := 0/*exEditBorderNone*/ oitem3:EditWidth := -128 oitem3:EditValue := 25 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
86 |
How can I show a horizontal separator/line between groups (method 1,pattern)
|
85 |
How can I show a vertical separator/line between groups (method 3,EBN color)
|
84 |
How can I show a vertical separator/line between groups (method 2,solid color)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2,oitem3 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("") oitem1:ItemHeight := 128 oitem1:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/ oitem1:EditBorder := 0/*exEditBorderNone*/ oitem1:EditWidth := 32 oitem1:EditValue := 25 oitem2 := oItems1:Add("") oitem2:Enabled := .F. oitem2:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oitem2:ItemHeight := 96 oitem2:CaptionWidth := 8 oitem3 := oItems1:Add("") oitem3:ItemHeight := 128 oitem3:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/ oitem3:EditBorder := 0/*exEditBorderNone*/ oitem3:EditWidth := 32 oitem3:EditValue := 25 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
83 |
How can I show a vertical separator/line between groups (method 1,pattern)
|
82 |
How can I show a pattern on the items
|
81 |
How can I show a thick frame arround the items
|
80 |
How can I add some additional icons on the background
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 1/*exGroupPopup*/ oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oItems:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oItems:Padding := "0,0,0,16" oItems:BackgroundExt := "root[text=`<img>2</img><font ;6><fgcolor 808080><off -2> clipboard </off></font></fgcolor><img>2</img>`,align=0x21]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
79 |
How can I add some additional text on the background
|
78 |
How can I assign a tooltip to an item (method 2)
|
77 |
How can I assign a tooltip to an item (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:Items():Add("ToolTip"):Tooltip := "This is a bit of text that should be shown when cursor hovers the item" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
76 |
How can I assign a spin field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Spin") oitem:AllowEdit := 512/*exItemEditSpin*/ oitem:EditWidth := 16 oitem:EditValue := 15 oitem:EditBorder := 0/*exEditBorderNone*/ oitem:SetProperty("EditOption",2/*exEditMaxValue*/,1000) oitem1 := oItems:Add("Edit-Spin") oitem1:AllowEdit := 513/*exItemEditSpin+exItemEditText*/ oitem1:EditWidth := -128 oitem1:EditValue := 15 oitem1:SetProperty("EditOption",2/*exEditMaxValue*/,1000) oitem2 := oItems:Add("Splider-Spin") oitem2:AllowEdit := 515/*exItemEditSpin+exItemEditSlider*/ oitem2:EditWidth := -128 oitem2:EditValue := 25 oitem2:EditBorder := 0/*exEditBorderNone*/ oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
75 |
How can I assign a spin field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Spin[id=10][edittype=0x0200][edit=15][border=0][max=1000][editwidth=16],Edit-Spin[id=20][edittype=0x0201][edit=15][max=1000][editwidth=-128],Splider-Spin[id=30][edittype=0x0203][edit=25][border=0][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
74 |
How can I add a vertical slider (method 2)
|
73 |
How can I add a vertical slider (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Vertical") oitem:ItemHeight := 128 oitem:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/ oitem:EditBorder := 0/*exEditBorderNone*/ oitem:EditWidth := 32 oitem:EditValue := 25 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
72 |
How can I disable an editor (method 2)
|
71 |
How can I disable an editor (method 1)
|
70 |
How can I lock an editor (method 2)
|
69 |
How can I lock an editor (method 1)
|
68 |
How can I assign a font field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Font") oitem:AllowEdit := 7/*exItemEditFont*/ oitem:EditWidth := -128 oitem:EditValue := "Tahoma" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
67 |
How can I assign a font field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Font[id=10][edittype=0x07][edit=Tahoma][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
66 |
How can I assign a color field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Color") oitem:AllowEdit := 6/*exItemEditColor*/ oitem:EditBorder := 0/*exEditBorderNone*/ oitem:EditWidth := -128 oitem:EditValue := 255 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
65 |
How can I assign a color field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Color[id=10][edittype=0x06][edit=#FF0000][border=0][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
64 |
How can I assign a scrollbar field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("ScrollBar") oitem:AllowEdit := 5/*exItemEditScrollBar*/ oitem:EditWidth := -128 oitem:EditValue := "25" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
63 |
How can I assign a scrollbar field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "ScrollBar[id=10][edittype=0x05][edit=25][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
62 |
Is it possible to change the tooltip beging shown when I change the slider/scroll/progress value
|
61 |
How can I hide the tooltip beging shown when I change the slider/scroll/progress value
|
60 |
How can I assign a progress field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Progress") oitem:AllowEdit := 4/*exItemEditProgress*/ oitem:EditWidth := -128 oitem:EditValue := 25 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
59 |
How can I assign a progress field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Progress[id=10][edittype=0x04][edit=25][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
58 |
How can I assign a slider field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Slider") oitem:AllowEdit := 3/*exItemEditSlider*/ oitem:EditWidth := -128 oitem:EditValue := 25 oitem1 := oItems:Add("Slider") oitem1:AllowEdit := 3/*exItemEditSlider*/ oitem1:EditBorder := 0/*exEditBorderNone*/ oitem1:EditWidth := -128 oitem1:SetProperty("EditOption",1/*exEditMinValue*/,50) oitem1:SetProperty("EditOption",2/*exEditMaxValue*/,450) oitem1:SetProperty("EditOption",3/*exEditTickStyle*/,2) oitem1:SetProperty("EditOption",4/*exEditTickFrequency*/,50) oitem1:SetProperty("EditOption",5/*exEditTickLabel*/,"value = vmin ? '<br><font ;6><b>'+value : ( value = vmax ? '<br><font ;6><b>'+value : ( value = 200 ? '<br><font ;6><b><fgcolor FF0000>'+value : '' ) )") oitem1:EditValue := 345 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
57 |
How can I assign a slider field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Slider[id=10][edittype=0x03][edit=25][editwidth=-128],Slider[id=20][edittype=0x03][edit=345][border=0][min=50][max=450][tick=2][freq=50][ticklabel=value = vmin ? '<br><font ;6><b>'+value : ( value = vmax ? '<br><font ;6><b>'+value : ( value = 200 ? '<br><font ;6><b><fgcolor FF0000>'+value : '' ) )][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
56 |
How can I assign a mask (time) field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Time") oitem:AllowEdit := 2/*exItemEditMask*/ oitem:EditWidth := -128 oitem:EditMask := "99:00:00;;0;overtype,warning=Invalid character" oitem:EditValue := "123456" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
55 |
How can I assign a mask (time) field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Time[id=10][edittype=0x02][edit=12:34:56][mask=99:00:00;;0;overtype,warning=Invalid character][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
54 |
How can I assign a mask (license key) field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("License Key") oitem:AllowEdit := 2/*exItemEditMask*/ oitem:EditWidth := -128 oitem:EditMask := "AAAA-AAAA-AAAA-AAAA" oitem:EditValue := "1234" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
53 |
How can I assign a mask (license key) field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "License Key[id=10][edittype=0x02][edit=1234-____-____-____][mask=AAAA-AAAA-AAAA-AAAA][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
52 |
How can I assign a mask (IP address) field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("IP Address") oitem:AllowEdit := 2/*exItemEditMask*/ oitem:EditWidth := -128 oitem:EditMask := "{0,255}.{0,255}.{0,255}.{0,255}" oitem:EditValue := "1.2.3.4" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
51 |
How can I assign a mask (IP address) field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "IP Address[id=10][edittype=0x02][edit=1.2.3.4][mask={0,255}.{0,255}.{0,255}.{0,255}][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
50 |
How can I assign a mask (phone) field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Phone") oitem:AllowEdit := 2/*exItemEditMask*/ oitem:EditWidth := -128 oitem:EditMask := "!(9999) 000 000;;;empty,select=4,overtype,beep" oitem:EditValue := "0771638317" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
49 |
How can I assign a mask (phone) field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Phone[id=10][edittype=0x02][edit=(0771) 638 317][mask=!(9999) 000 000;;;empty,select=4,overtype,beep][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
48 |
How can I assign a mask (date) field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("") oitem:AllowEdit := 2/*exItemEditMask*/ oitem:EditWidth := -128 oitem:EditMask := "`Date: `{1,12}/{1,31}/{1950,2050};;;select=1" oitem:EditValue := "02/15/2015" oitem1 := oItems:Add("Date") oitem1:AllowEdit := 2/*exItemEditMask*/ oitem1:EditWidth := -128 oitem1:EditMask := "!00/00/0000;;0;empty,validateas=1,invalid=Invalid date!,warning=Invalid character!,select=4,overtype" oitem1:EditValue := "02/15/2015" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
47 |
How can I assign a mask (date) field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "[id=10][edittype=0x02][edit=Date: 2/15/2015][mask=`Date: `{1,12}/{1,31}/{1950,2050};;;select=1][editwidth=-128],Date[id=20][edittype=0x02][edit=02/15/2015][mask=!00/00/0000;;0;empty,validateas=1,invalid=Invalid date!,warning=Invalid character!,select=4,overtype][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
46 |
How can I assign a mask (integer) field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Integer") oitem:AllowEdit := 2/*exItemEditMask*/ oitem:EditWidth := -128 oitem:EditMask := ";;;float,grouping=,digits=0" oitem:EditValue := 1000 oitem1 := oItems:Add("Integer-Grouping") oitem1:AllowEdit := 2/*exItemEditMask*/ oitem1:EditWidth := -128 oitem1:EditMask := ";;;float,decimal=,digits=0,select=1" oitem1:EditValue := 1000 oitem2 := oItems:Add("Integer-In-Range") oitem2:AllowEdit := 2/*exItemEditMask*/ oitem2:EditWidth := -128 oitem2:EditMask := "{0,2050}" oitem2:EditValue := 1000 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
45 |
How can I assign a mask (integer) field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Integer[id=10][edittype=0x02][edit=1000][mask=;;;float,grouping=,digits=0][editwidth=-128],Integer-Grouping[id=20][edittype=0x02][edit=1,000][mask=;;;float,decimal=,digits=0,select=1][editwidth=-128],Integer-In-Range[id=30][edittype=0x02][edit=1000][mask={0,2050}][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
44 |
How can I assign a mask field to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Mask") oitem:AllowEdit := 2/*exItemEditMask*/ oitem:EditWidth := -128 oitem:EditMask := ";;;float,select=1" oitem:EditValue := 1000 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
43 |
How can I assign a mask field to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Text-Box[id=10][edittype=0x02][edit=1,000][mask=;;;float,select=1][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
42 |
How can I assign an edit / text-box to the item (method 2)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oItems := oExContextMenu:Items() oitem := oItems:Add("Mask") oitem:AllowEdit := 1/*exItemEditText*/ oitem:EditValue := "this is a text" oitem:EditWidth := -128 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
41 |
How can I assign an edit / text-box to the item (method 1)
PROCEDURE OnEditChange(oExContextMenu,Itm) DevOut( Transform(Itm,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/ oExContextMenu:ToString := "Text-Box[edit=this is a text][editwidth=-128]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
40 |
How can I display a tab into the context menu (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems,oItems1,oItems2,oItems3 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oItems := oExContextMenu:Items() oItems:ToString := "[id=0][group=0x0103][itemspad=4,4,4,4]([id=-10][group=0x03](),[id=0][bg=RGB(240,240,240)][group=0x03][itemspad=4,4,4,4]([id=-100]))" oItems1 := oItems:item(-10):Items() oItems1:Add("",0,0):Padding := "8,0,0,0" oitem := oItems1:Add("New Page") oitem:ToString := "[typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=RGB(255,255,255)][bgsel=RGB(240,240,240)][bgselhot=RGB(240,240,240)][height=16][group=0x03][tab=-100][pad=2,0,2,0]([id=50][group=0x03]([]))" oitem:Caption := "Page<off -5><font ;5><b>1</b></font></off>" oItems2 := oitem:Items() oItems2:Add("add here fields for page 1"):Enabled := .F. oitem1 := oItems1:Add("New Page") oitem1:ToString := "[typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=RGB(255,255,255)][bgsel=RGB(240,240,240)][bgselhot=RGB(240,240,240)][height=16][group=0x03][tab=-100][pad=2,0,2,0]([id=50][group=0x03]([]))" oitem1:Caption := "Page<off -5><font ;5><b>2</b></font></off>" oItems3 := oitem1:Items() oItems3:Add("add here fields for page 2"):Enabled := .F. oItems1:Add("",0,0):Padding := "8,0,0,0" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
39 |
How can I add check-buttons to items, without showing the check-box (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2,oitem3 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Check 1") oitem1:Check := .T. oitem1:Checked := .T. oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem2 := oItems1:Add("Check 2") oitem2:Check := .T. oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem3 := oItems1:Add("Check 3") oitem3:Check := .T. oitem3:Checked := .T. oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
38 |
How can I add check-buttons to items, without showing the check-box (method 1)
|
37 |
How can I add radio buttons to items, without showing the radio-buttons (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2,oitem3 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Radio 1",,1000) oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem1:Radio := .T. oitem1:RadioGroup := 100 oitem2 := oItems1:Add("Radio 2",,1001) oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem2:Radio := .T. oitem2:RadioGroup := 100 oitem3 := oItems1:Add("Radio 2",,1003) oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/ oitem3:Radio := .T. oitem3:RadioGroup := 100 oItems1:item(1000):Checked := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
36 |
How can I add radio buttons to items, without showing the radio-buttons (method 1)
|
35 |
How can I add check-buttons to items (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Check 1") oitem1:Check := .T. oitem1:Checked := .T. oItems1:Add("Check 2"):Check := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
34 |
How can I add check-buttons to items (method 1)
|
33 |
How can I add radio buttons to items (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2,oitem3 LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 1/*exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Radio 1",,1000) oitem1:Radio := .T. oitem1:RadioGroup := 100 oitem2 := oItems1:Add("Radio 2",,1001) oitem2:Radio := .T. oitem2:RadioGroup := 100 oitem3 := oItems1:Add("Radio 2",,1003) oitem3:Radio := .T. oitem3:RadioGroup := 100 oItems1:item(1000):Checked := .T. oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
32 |
How can I add radio buttons to items (method 1)
|
31 |
How can I change the selection/highlighting color
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 128,0,0 } ) , .F. )) oExContextMenu:SetProperty("Background",111/*exMenuHotForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oExContextMenu:ToString := "[group=3](Item 1[chk],Item 2[chk])" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
30 |
How can I prevent showing/hide the border on the selected/highlighted item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,oExContextMenu:SelBackColor()) oExContextMenu:ToString := "Item 1,Item 2" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
29 |
How can I display a tab into the context menu (method 1)
|
28 |
How do I prevent highlighting the item (method 2.b)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("No highlight"):Enabled := .F. oItems:Add("Item 2") oItems:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
27 |
How do I prevent highlighting the item (method 2.a)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("No highlight",2) oitem:Items():Add("") oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems:Add("Item 2") oItems:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
26 |
How do I prevent highlighting the item (method 1.b)
|
25 |
How do I prevent highlighting the item (method 1.a)
|
24 |
How can I can I assign pictures or images for the item (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif") oExContextMenu:SetProperty("HTMLPicture","pic2","c:\exontrol\images\auction.gif") oItems := oExContextMenu:Items() oItems:Add("Item"):HTMLImage := "pic1" oItems:Add("Item"):HTMLImage := "pic2" oItems:Add("",1) oItems:Add("Item <img>pic1</img>") oItems:Add("Item <img>pic2</img>") oItems:Add("",1) oItems:Add("<img>pic1</img> Item <img>pic2</img>") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
23 |
How can I can I assign pictures or images for the item (method 1)
|
22 |
How can I can I assign icons for the item (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oItems := oExContextMenu:Items() oItems:Add("Item"):Image := 1 oItems:Add("Item"):Image := 2 oItems:Add("",1) oItems:Add("Item <img>1</img>") oItems:Add("Item <img>2</img>") oItems:Add("",1) oItems:Add("Item <img>1</img>"):Image := 1 oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
21 |
How can I can I assign icons for the item (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oExContextMenu:Items():ToString := "Item[img=1],Item[img=2],[sep],Item <img>1</img>,Item <img>2</img>,[sep],Item <img>1</img>[img=1]" oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
20 |
How can I change the visual appearance / background color (EBN) for a collection of items/group (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oItems := oExContextMenu:Items() oItems:Padding := "2,2,2,2" oItems:SetProperty("BackColor",0x1000000) oItems:Add("Item 1") oItems:Add("Item 2") oItems:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
19 |
How can I change the visual appearance / background color (EBN) for a collection of items/group (method 1)
|
18 |
How can I change the background color for a collection of items/group (method 2)
|
17 |
How can I change the background color for a collection of items/group (method 1)
|
16 |
How can I change the visual appearance / background color (EBN) for a specified item (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oItems := oExContextMenu:Items() oItems:Add("Item 1") oItems:Add("Item 2"):SetProperty("BackColor",0x1000000) oItems:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
15 |
How can I change the visual appearance / background color (EBN) for a specified item (method 1)
|
14 |
How can I change the background color for a specified item (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1") oItems:Add("Item 2"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
13 |
How can I change the background color for a specified item (method 1)
|
12 |
How do I add a popup or a sub-menu so it show when cursor hovers it (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems1 := oItems:Add("Popup",2):Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
11 |
How do I add a popup or a sub-menu so it show when cursor hovers it (method 1)
|
10 |
How can I arrange the items by grouping (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2,oitem3 LOCAL oItems,oItems1,oItems2,oItems3,oItems4 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oItems1 := oitem:Items() oitem1 := oItems1:Add("Horizontal",2) oitem1:GroupPopup := 1/*exGroupPopup*/ oItems2 := oitem1:Items() oItems2:Add("Sub-Item <b>A</b>") oItems2:Add("Sub-Item <b>B</b>") oItems2:Add("Sub-Item <b>C</b>") oItems1:Add(""):CaptionWidth := 16 oitem2 := oItems1:Add("Vertical",2) oitem2:Alignment := 1/*exCenter*/ oitem2:GroupPopup := 257/*exGroupPopupVertical+exGroupPopup*/ oItems3 := oitem2:Items() oItems3:Add("Sub-Item <b>A</b>") oItems3:Add("Sub-Item <b>B</b>") oItems3:Add("Sub-Item <b>C</b>") oItems1:Add(""):CaptionWidth := 16 oitem3 := oItems1:Add("Popup",2) oItems4 := oitem3:Items() oItems4:Add("Sub-Item <b>A</b>") oItems4:Add("Sub-Item <b>B</b>") oItems4:Add("Sub-Item <b>C</b>") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
9 |
How can I arrange the items by grouping (method 1)
|
8 |
How can I arrange some items vertically, and some horizontally (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem,oitem1,oitem2 LOCAL oItems,oItems1,oItems2,oItems3 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oItems1 := oitem:Items() oItems1:Add("1") oItems1:Add("2") oItems1:Add("3") oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oitem1 := oItems:Add("",2) oItems2 := oitem1:Items() oItems2:Add("4") oItems2:Add("5") oItems2:Add("6") oitem1:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oitem2 := oItems:Add("",2) oItems3 := oitem2:Items() oItems3:Add("7") oItems3:Add("8") oItems3:Add("9") oitem2:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
7 |
How can I arrange some items vertically, and some horizontally (method 1)
|
6 |
How can I assign multiple-lines to an item (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oItems1 := oitem:Items() oItems1:Add("Item 1"):Caption := "Item <br><c><b>1" oItems1:Add("Item 2"):Caption := "Item <br><c><b>2" oItems1:Add("Item 3"):Caption := "Item <br><c><b>3" oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
5 |
How can I assign multiple-lines to an item (method 1)
|
4 |
How can I add new items arranged horizontally to the context menu (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oitem LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oitem := oItems:Add("",2) oItems1 := oitem:Items() oItems1:Add("Item 1") oItems1:Add("Item 2") oItems1:Add("Item 3") oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/ oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
3 |
How can I add new items arranged horizontally to the context menu (method 1)
|
2 |
How can I add new items to the context menu (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oExContextMenu LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oExContextMenu := XbpActiveXControl():new( oForm:drawingArea ) oExContextMenu:CLSID := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/ oExContextMenu:create(,, {10,60},{610,370} ) oItems := oExContextMenu:Items() oItems:Add("Item 1") oItems:Add("Item 2") oItems:Add("Item 3") oExContextMenu:Select() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
1 |
How can I add new items to the context menu (method 1)
|